package com.weiaibenpao.demo.chislim.ui.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.weiaibenpao.demo.chislim.R;
import com.weiaibenpao.demo.chislim.bean.MarathonBean;

/**
 * Created by wlx on 2018/1/8.
 */

public class MarathonListAdapter extends BaseQuickAdapter<MarathonBean.MarathoListBean,BaseViewHolder> {
    public MarathonListAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, MarathonBean.MarathoListBean item) {
            helper.setText(R.id.tv_marathon_title,item.getMarathonTitle())
                    .setText(R.id.tv_remainTime,item.getRemainTime())
                    .setText(R.id.tv_joinNumber,"已报名"+item.getJoinNumber()+"人");
        Glide.with(mContext).load(item.getMContentImg()).into((ImageView) helper.getView(R.id.img_marathon));
//        helper.addOnClickListener(R.id.img_marathon);

    }
}
